package com.dao.impl;

import com.dao.EnterpriceDao;
import com.entry.Enterprise;
import com.util.DBHelper;

import java.util.ArrayList;


public class EnterpriceDaoImpl implements EnterpriceDao {
    DBHelper db = new DBHelper();

    @Override
    public ArrayList selectQuery(Enterprise enterprise) {
        String name = enterprise.getName();
        String sql = "select * from enterprise where name like ?";
        ArrayList<Enterprise> list = db.selectinfo(sql, Enterprise.class, " % " + enterprise.getName() + " % ");
        return list;
    }
}
